load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")

cc_binary(
    name = "librsu_component.so",
    linkshared = True,
    linkstatic = False,
    deps = [":rsu_component_lib"],
)

cc_library(
    name = "rsu_component_lib",
    srcs = ["rsu_component.cc"],
    hdrs = ["rsu_component.h"],
    linkopts = [
        "-pthread -lz -lrt -luuid",
    ],
    deps = [
        "@protobuf_import//:protobuf_import",
        "//base/device_connect/rsu:rsu_device",
        "@com_github_google_glog//:glog",
        "@fastrtps//:fastrtps",
        "@com_github_gflags_gflags//:gflags",
        "@airosrt//:airosrt",
        "@yaml_cpp//:yaml_cpp",
        "//middleware/device_service/proto:rsu_config_cc_pb",
        "//base/device_connect/proto:rsu_data_cc_pb",
    ],
    copts = [
        "-DUSE_CYBERRT",
        "-DMODULE_NAME=\\\"rsu_service\\\""
    ],
)
